package org.example.controller;

import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 *
 */
@Controller
public class UserController {

    //@Resources 根据bean名字进行自动装配  jdk8可以直接使用 jdk11将此注解拿到javaee里面了
    @Autowired  //根据类型进行自动装配
    UserService userService;

    public UserService getUserService() {
        return userService;
    }

    public void setUserService(UserService userService) {
        this.userService = userService;
    }
}
